package com.zzyl.nursing.member.controller;


import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.nursing.dto.FamilyLoginDto;
import com.zzyl.nursing.service.FamilyService;
import com.zzyl.nursing.vo.LoginVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 小程序微信登录接口
 */

@RestController
@RequestMapping("/member/user")
public class FamilyMemberController {
    @Autowired
    private FamilyService familyService;

    @PostMapping("/login")
    public AjaxResult login(@RequestBody FamilyLoginDto familyLoginDto){
        LoginVo login = familyService.login(familyLoginDto);
        return AjaxResult.success(login);

    }
}
